package kz.pompei.OneGwt.client.personrole.impl;

import kz.pompei.OneGwt.cmodel.SimpleRecord;
import kz.pompei.OneGwt.ifaces.widget.gwtadapters.ListBox_impl_ListWidget;

import com.google.gwt.user.client.ui.ListBox;

public class SimpleListWidget extends ListBox_impl_ListWidget<SimpleRecord> {
  public SimpleListWidget(ListBox widget) {
    super( widget );
  }
  
  @Override
  protected String extractId(SimpleRecord record) {
    if (record == null) return null;
    return record.getId();
  }
  
  @Override
  protected String extractDisplayStr(SimpleRecord record) {
    if (record == null) return "-";
    return record.getDisplayStr();
  }
}
